package org.aynu.userservice.feign;

import org.aynu.cartservice.common.CartResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.Map;


/**
 * 购物车服务客户端
 *
 * @author 小粥
 * @since 2025/03/02
 */

@FeignClient(name = "Cart-Service")
public interface CartServiceClient {


    /**
     * 创建 Cart
     *
     * @param map 地图
     * @return {@link CartResponse }<{@link Integer }>
     * @author 小粥
     * @since 2025/03/02
     */

    @PostMapping("/cart/createCart")
    CartResponse<Integer> createCart(@RequestBody Map<String,Object> map);


    /**
     * 选择 Cart ID
     *
     * @param map 地图
     * @return {@link CartResponse }<{@link Integer }>
     * @author 小粥
     * @since 2025/03/02
     */

    @PostMapping("/cart/selectCartId")
    CartResponse<Integer> selectCartId(@RequestBody Map<String,Object> map);

}
